package com.unhz.taigu.service;


import com.unhz.generator.pojo.TryOrder;
import com.unhz.generator.utils.Page;
import com.unhz.generator.vo.AddTryOrderFindVo;
import com.unhz.generator.vo.TryOrderVo;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.HashMap;
import java.util.List;

/**
 * @Author: 魏运奇
 * @Description:
 * @Date: Created in 下午 5:44 2018/1/31 0031
 * @Modified By: V1.0.0
 */
@Repository
public interface TryOrderService {

    /**
     * 查询试做订单列表
     * @param pageNo  页数
     * @param pageSize  每页数量
     * @param keywords
     * @return
     */
    Page<TryOrder> selectTryOrderList(String pageNo, Integer pageSize, String keywords,Integer adminId,Integer roleId);

    List<TryOrderVo> selectTryOrder(HashMap<String,Object> map);

    /**
     * 该变试做订单状态
     * @param id 试做id
     * @param status 状态
     * @return
     */
    void changsStatus(Long id, Integer status,Date finishTime);

    boolean deleteById(Long id);

    Integer insert(TryOrderVo tryOrderVo);

    /**
     * 添加试做订单前查询
     * @param orderId 订单id
     * @return
     */
    AddTryOrderFindVo selectTryOrderAdd(Long orderId);

    /**
     * 修改试做地址
     * @param addTryOrderFindVo
     */
    boolean  updateAddress(AddTryOrderFindVo addTryOrderFindVo);

    /**
     * 修改试作订单收货信息
     * @param tryOrder
     * @return
     */
    public int updateInfo(TryOrder tryOrder);

    /**
     * 根据订单id查找到试做订单信息
     * @param orderId
     * @return
     */
    TryOrder selectByOrderId(Integer orderId);

    /**
     * 新增试做订单信息
     * @param tryOrder
     * @return
     */
    int insertTryOrder(TryOrder tryOrder);

    /**
     * 查询订单
     * @param id
     * @return
     */
    TryOrder selectTryOrder(Long id);
}
